<template>
  <div>
    <input @keydown.enter="enterFn" type="text">
    <hr>
    <input @keydown.esc="escFn" type="text">
    <hr>
    <input v-on:input="liujia" type="text">
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  methods: {
    enterFn(){
      console.log("回车被按下了");
    },
    escFn(){
      console.log("esc被按下了");
    },
    liujia(){
      
    }
  },
};
</script>

<style lang="scss" scoped>
</style>